﻿using DreamCMS.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DreamCMS.BLL.Factory.Interface
{
    public interface ITagDAO
    {

        /// <summary>
        /// 插入一条新标签记录
        /// </summary>
        /// <param name="tag">标签实体</param>
        /// <returns>返回插入的新纪录的ID号</returns>
        long InsertTag(TagInfo tag);
        /// <summary>
        /// 更新标签纪录（根据某个标签的ID来做选择纪录）
        /// </summary>
        /// <param name="tag">标签实体</param>
        /// <returns>更新受影响行数</returns>
        long UpdateTag(TagInfo tag);
        /// <summary>
        /// 删除一个标签纪录
        /// </summary>
        /// <param name="tagId">标签ID，即Terms表中的termID</param>
        /// <returns>受影响行数</returns>
        long DeleteTag(long tagId);
        /// <summary>
        /// 根据ID获取标签
        /// </summary>
        /// <param name="tagId"></param>
        /// <returns></returns>
        TagInfo GetTag(long tagId);

        /// <summary>
        /// 获取标签集合
        /// </summary>
        /// <returns></returns>
        List<TagInfo> GetTagList();

        /// <summary>
        /// 根据ID序列获取标签集合
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        List<TagInfo> GetTagList(string ids);
    }
}
